API Documentation
Public Member Functions | List of all members
nkGraphics::MainSystem Class Referencefinal

Main interface with the component system. More...

Inheritance diagram for nkGraphics::MainSystem:

Public Member Functions

 ~MainSystem ()
 
RenderergetRenderer () const
 
bool isInitialized () const
 
bool getHasRunToContinue () const
 
void setHasRunToContinue (bool value)
 
bool autoConfigure ()
 
bool initialize ()
 
void run (RenderContext *context)
 
void shutdown ()
 
bool frame (RenderContext *context)
 
void tickForNewFrame (RenderContext *context)
 

Detailed Description

Main interface with the component system.

Used to initialize or shuts all of its sub parts, also used for framing or running.

Constructor & Destructor Documentation

◆ ~MainSystem()

nkGraphics::MainSystem::~MainSystem ( )

Destructor.

Member Function Documentation

◆ getRenderer()

Renderer* nkGraphics::MainSystem::getRenderer ( ) const
Returns
The renderer used by the system.

◆ isInitialized()

bool nkGraphics::MainSystem::isInitialized ( ) const
Returns
Whether the system is initialized (true) or not (false).

◆ getHasRunToContinue()

bool nkGraphics::MainSystem::getHasRunToContinue ( ) const
Returns
Whether the system has its running flag activated (true) or not (false). When initializing, the flag starts at true.

◆ setHasRunToContinue()

void nkGraphics::MainSystem::setHasRunToContinue ( bool  value)

Sets whether the run should proceed. Can be used to halt the run.

Parameters
valueIf the rendering should be stopped (true) or not (false).

◆ autoConfigure()

bool nkGraphics::MainSystem::autoConfigure ( )

Auto configures the system. By default, the system will search for a configuration file named 'GraphicConfig.cfg' in the launch path and load the configuration from it.

Returns
If the configuration could load from it.

◆ initialize()

bool nkGraphics::MainSystem::initialize ( )

Initializes the component and all of its sub part. This implies launching the graphic system and initializing the renderer.

Returns
If the initialization was a success (true) or not (false).

◆ run()

void nkGraphics::MainSystem::run ( RenderContext context)

Runs the component. This means entering an internal running loop. This loop can be sufficient for most use cases. It ticks inputs and rendering for a given context. For more complex usage (multi windowing for instance), it is recommended to manually frame.

Parameters
contextThe context to run with.

◆ shutdown()

void nkGraphics::MainSystem::shutdown ( )

Shuts down the component. This frees all memory linked to it and ensure a clean leave.

◆ frame()

bool nkGraphics::MainSystem::frame ( RenderContext context)

Frames the component, once. This will update input, and render, only once.

Parameters
contextThe context to render for.
Returns
If the rendering was a success (true), or not (false).

◆ tickForNewFrame()

void nkGraphics::MainSystem::tickForNewFrame ( RenderContext context)

Ticks the engine for a new frame, without rendering. This implies setting everything up for a clean rendering for a context, and checking how async work is going. Called automatically by a frame() call.

Parameters
contextThe context to tick for.

The documentation for this class was generated from the following file: